<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.wenwu.common.utils.Status.AttachmentFrom"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>遗址概况</title>
<script type="text/javascript" src="${path}/js/scripts/bootstart.js"></script>
<link rel="stylesheet" type="text/css" href="${path}/css/focus.css" />
</head>
<body>
	<div style="color: red;">${relicsdetail.msg}${errorMsg}</div>
	<form id="relicsdetailForm" method="post"
		action="${path}/mgr/common/addRelicsdetail">
		<div style="display: none;">
			<input name="detailId" class="mini-textbox" id="detailId" value="${relicsdetail.detailId}" />
		</div>
		<div class="form_nav">
			<table width="100%" cellpadding="4" cellspacing="0">
				<tr>
					<td width="10%" class="xx_bt nonebor"><span
						class="required_cls">*</span>遗址名称:</td>
					<td width="90%" class="xx_type  nonebor"><input
						id="detailName" name="detailName" style="width: 90%;"
						required="true" class="mini-textbox" vtype="maxLength:100"
						value="${relicsdetail.detailName}" /></td>
				</tr>
				<tr>
					<td class="xx_bt"><span class="required_cls">*</span>概况信息:</td>
					<td class="xx_type" id="content_td"><textarea
							id="articleAddContent">${relicsdetail.detailDesc}</textarea> <textarea
							id="articleAddContent-hidden" class="mini-textarea"
							style="display: none" required="true" name="detailDesc"></textarea></td>
				</tr>
			</table>
		</div>
		<div style="text-align: center; padding: 10px;">
			<a class="mini-button" onclick="addform.saveData" id="sub_button"
				iconCls="icon-save" style="width: 60px; margin-right: 20px;">保存</a>
			<a iconCls="icon-cancel" class="mini-button"
				onclick="$.form.onCancel()" style="width: 60px;">取消</a>
		</div>
	</form>
</body>
<script type="text/javascript" src="${path}/js/scripts/dataform.js"></script>
<script type="text/javascript" charset="utf-8"
	src="${path}/js/scripts/swfupload/swfupload.js"></script>
<script type="text/javascript" charset="utf-8"
	src="${path}/js/scripts/plugin/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8"
	src="${path}/js/scripts/plugin/ueditor/ueditor.all.js"></script>
<script type="text/javascript">
	mini.parse();
	var width = document.getElementById("content_td").offsetWidth;//获取td的宽度	
	var articleEditor = UE.getEditor('articleAddContent', {
		initialFrameWidth : width - 30,
		initialFrameHeight : 400,
		toolbars : [ [ 'undo', 'redo', 'bold', 'italic', 'autotypeset',
				'insertimage', 'imagefloat', 'cleardoc', 'forecolor',
				'backcolor', 'fontsize', 'fontfamily', 'underline',
				'strikethrough', 'fontborder', 'formatmatch', 'horizontal',
				'insertcode', 'inserthtml', 'justify', '|', 'justifyleft',
				'justifycenter', 'justifyright', 'justifyjustify', '|',
				'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
				'link', 'unlink', 'paragraph' ] ]
	});
	$(function() {
		$.form.init(); //初始化表单
		window.addform = {};
		addform.saveData = function() {
			var form = new mini.Form("#relicsdetailForm");
			form.validate();
			if (form.isValid() == false) {
				return;
			}
			var str = articleEditor.getContent();
			if (!str) {
				mini.alert("请输入概况信息！");
				return;
			}
			mini.get("articleAddContent-hidden").setValue(str);
			$("#relicsdetailForm").submit();
		};
	});
</script>
</html>